<template>
	<div>
		<view class="seo">
			<input class="seos" type="text" value="" placeholder="输入成绩状态/班级查询"/>
			<image class="stb" src="../../../static/seo.png" mode=""></image>
		</view>
		
		<template v-if="neirong.length !== 0">
			<view class="list" v-for="(itam,index) in neirong" :key="index" @click="showStuWorkDetail(itam)">
				<view class="list_z" style="width: 450upx;" ><text>{{itam.depa}}</text><text class="m-l2">{{itam.stuName}}</text> </view>
				<view class="list_z" style="text-align: end;width: 100upx;">{{status_list[(itam.workStatus >> 0) - 1]}}</view>
				
				<image class="qiehuan" src="../../../static/fan.png" mode=""></image>
			</view>
		</template>
		<template v-else>
			<div style="text-align: center;padding: 30rpx 0">
				暂无数据
			</div>
		</template>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				pageNo: 1,
				pageSize: 9999,
				classId: "",
				workId: "",
				workName: "",
				stu_list: [

				],
				termWorkName_list: [],
				status_list: ['未读', '未完成', '已完成'],
				// 作业状态（1：未读；2：未完成；3：已完成）
				workName1: "",
				sear: "",
				neirong:[],
			}
		},
		onLoad(option) {
			this.workId = option.workId;
			this.workName1 = option.workName;
			uni.setNavigationBarTitle({
				title: option.workName
			})
			this.getWorkScoreListTea();
			this.getTermWorkNameSelect();
		},
		created() {},
		methods: {
			showStuWorkDetail(item) {
				uni.navigateTo({
					url: "./stu_detail?workId=" + this.workId + "&workName=" + this.workName1 + "&stuId=" + item.stuId
				});
			},
			handleChange() {
				console.log(this.termWorkName);
			},
			getTermWorkNameSelect() {
				const { termWorkName } = this;
				this.pyReq(this.$http.getTermWorkNameSelect, {
					termWorkName
				}, (res) => {
					if(res.code == 0) {
						this.termWorkName_list = res.result;
					}
				});
			},
			getWorkScoreListTea() {
				const {
					classId,
					pageNo,
					pageSize,
					workId
				} = this;
				this.pyReq(this.$http.getWorkScoreListTea, {
					pageNo,
					pageSize,
					classId,
					workId
				}, (res) => {
					if (res.code == 0) {
					
						// this.stu_list = res.result.records;
						this.neirong = res.result.records;
					}
				});
			}
		},
	}
</script>

<style>
	.seo{
		position: relative;
		background: #B31610;
		height: 100upx;
		padding-top: 40upx;
	}
	.seos{
		width: 663upx;
		height: 60upx;
		border-radius: 10upx;
		background: #FFFFFF;
		margin: 0 auto;
		font-size: 24upx;
		padding-left: 47upx;
		box-sizing: border-box;
	}
	.stb{
		position: absolute;
		right: 74upx;
		top: 56upx;
		width: 28upx;
		height: 30upx;
	}
	.sneirong{
		margin: 0 auto;
		border: 1px solid #B31610;
		width: 659upx;
		/* height: 236upx; */
		border-radius: 15upx;
		margin-top: 30upx;
	}
	.neirong{
		margin: 20upx;
	}
	.nr_t{
		border-bottom: 1px solid #666666;
		padding-bottom: 20upx;
	}
	.nr_t text{
		display: block;
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.nr_ts{
		font-size: 27upx;
		font-weight: 700;
		line-height: 70upx;
	}
	.nr_ts{
		font-size: 27upx;
		line-height: 70upx;
	}
	.nr_jd{
		display: block;
		text-align: end;
		font-size: 29upx;
		color: #B31610;
		font-weight: 700;
		margin-top: 35upx;
	}
	
	.list{
		display: flex;
		justify-content:space-between;
		border-bottom: 1px solid #666666;
	}
	.list_z{
		margin-left: 40upx;
		margin-top: 30upx;
		margin-bottom: 20upx;
	}
	.qiehuan{
		width: 14upx;
		height: 26upx;
		margin-right: 30upx;
		margin-top: 40upx;
	}
	.seo{
		position: relative;
		background: #B31610;
		height: 100upx;
		padding-top: 40upx;
	}
	.seos{
		width: 663upx;
		height: 60upx;
		border-radius: 10upx;
		background: #FFFFFF;
		margin: 0 auto;
		font-size: 24upx;
		padding-left: 47upx;
		box-sizing: border-box;
	}
	.stb{
		position: absolute;
		right: 74upx;
		top: 56upx;
		width: 28upx;
		height: 30upx;
	}
</style>
